package com.woniuxy.woniumall;

import com.woniuxy.woniumall.entity.Address;
import com.woniuxy.woniumall.mapper.OrderMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan("com.woniuxy.woniumall.mapper")
@EnableTransactionManagement
@EnableScheduling
@EnableCaching  //启动缓存
public class WoniumallApplication {

    public static void main(String[] args) {
        SpringApplication.run(WoniumallApplication.class, args);
    }
    @Bean
    public Address address(OrderMapper orderMapper ){
        Address a = new Address();
        //a.setOrderMapper(orderMapper);
        return a ;
    }
}
